<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>flex</title>
    <style>
        #container{
            display: flex;
            /* 一行显示 */
            /* flex-direction: row; */
            /* flex-direction: column; */
            /* 自动换行 */
            /* flex-wrap: wrap; */
            /* 换行和显示的结合 */
            flex-flow: row wrap;
        }
        .item{
            background: #369;
            border: 1px solid #ccc;
            padding: 1rem;
            text-align: center;
            margin: 0.75rem;
            /* 占几份 */
            flex: 2;
        }
        .one{
            flex: 4;
        }
    </style>
</head>
<body>
    <div id="container">
        <div class="item"><h1>item1</h1></div>
        <div class="item one"><h1>item2</h1></div>
        <div class="item"><h1>item3</h1></div>
        <div class="item"><h1>item4</h1></div>
        <div class="item"><h1>item5</h1></div>
    </div>
</body>
</html>